Skip to content

fix: Python 3.10 exports and unfiltered wasm bundle extraction - #105

Merged
jourdain merged 2 commits into
Kitware:masterfrom
user27182:fix/py310-export-and-tar-filter
Sep 27, 2026
Merged

jourdain merged 2 commits into
Kitware:masterfrom
user27182:fix/py310-export-and-tar-filter

Conversation

@user27182

Copy link
Copy Markdown
Contributor

Fixes two problems in 1.7.0 that CI does not see because it only tests Python 3.13.

  • to_wazex and to_html raise AttributeError: 'ZipFile' object has no attribute 'mkdir' on Python 3.10, which requires-python = ">=3.10" allows. ZipFile.mkdir was added in 3.11; the states/ and blobs/ directory entries are now written with writestr, so the archive layout is unchanged.
  • setup_wasm_directory calls tarfile.extractall without a filter, which emits a DeprecationWarning on Python 3.12 and 3.13 and trusts member paths before 3.14. It now uses filter="data" when available; the VTK 9.7.0 bundle extracts identically with it.

Found through trame-pyvista, whose test suite turns warnings into errors: there the warning aborted extraction, so every export downloaded the bundle again.

Changes drafted by Claude Opus 5.5 but fully understood by me.

🤖 Generated with Claude Code (Claude Opus 5.5)

user27182 and others added 2 commits September 26, 2026 11:51
ZipFile.mkdir was added in Python 3.11, so to_wazex and to_html raised
AttributeError on Python 3.10, which requires-python still allows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Calling tarfile.extractall without a filter emits a DeprecationWarning on
Python 3.12 and 3.13 and trusts member paths on older versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@user27182
user27182 marked this pull request as ready for review September 26, 2026 17:54
@jourdain
jourdain merged commit eb6bedb into Kitware:master Sep 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants